﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Maticsoft.DBUtility;


namespace SkWeb.FASJ
{
    public partial class BookMarkManagement : System.Web.UI.Page
    {
        public string fun = "";
        protected void Page_Load(object sender, EventArgs e)
        {

            if (!IsPostBack)
            {
                string strSql = "select * from tb_bookmark1 order by xh";
                DataTable dt = DbHelperOra.Query(strSql).Tables[0];
                this.GridView1.DataSource = dt.DefaultView;
                this.GridView1.DataBind();

            }
        }

        protected void gv_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "delete_")
            {
                string sqlStr = "delete from tb_bookmark1 where id="+e.CommandArgument.ToString();
                DbHelperOra.ExecuteSql(sqlStr);

                string strSql = "select * from tb_bookmark1 order by xh";
                DataTable dt = DbHelperOra.Query(strSql).Tables[0];
                this.GridView1.DataSource = dt.DefaultView;
                this.GridView1.DataBind();
              //  Response.Write(e.CommandArgument.ToString());
            }
        }
    }
}